<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html>
<head>
    <title>后台用户管理 -- </title>
    <base href="<%=basePath%>" />
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="i/xianqu.ico">
    <link rel="apple-touch-icon-precomposed" href="i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="css/amazeui.min.css" />
    <link rel="stylesheet" href="css/admin.css">
    <link rel="stylesheet" href="css/app.css">
    <style type="text/css">
    .waterTable tr td{
       background: #f3f4f6;
    }
    .water-field{
      font-size: 16px;
      font-weight: bold;
    }
    .info-field{
      border-bottom: 0;
    }
    .edit-field{
      display: none;
    }
    
    .tpl-block{
      font-size: 14px;
    }
    </style>
</head>
<% String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); %>
<body data-type="generalComponents">


     <jsp:include page="../header.jsp">
        <jsp:param value="11" name="a"/>
        <jsp:param value="1" name="b"/>
     </jsp:include>

    <div class="tpl-page-container tpl-page-header-fixed">

            <div class="tpl-portlet-components tpl-portlet-components-percent am-center">
                <div class="portlet-title">
                    <div class="caption bold">
                       <span>后台用户管理  </span>
                    </div>
                </div>
                <div class="tpl-block">
                    <div class="am-g" style="margin-bottom: 10px;">
                        <div class="am-u-sm-12 am-u-md-9">
                          <form class="queryForm am-form-inline" casedatagrid="datagrid" id="queryForm">
                            <div class="am-form-group">
							    <input type="text" name="loginId" class="form-control" placeholder="登陆ID">
							</div>
							<div class="am-form-group">
							    <button class="am-btn  am-btn-success am-radius am-btn-sm am-icon-search" type="submit"></button>
							</div>
						  </form>
                        </div>
                        <div class="am-u-sm-12 am-u-md-3">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <button auth-id="p_11_1_1" style="display: none;" type="button" onclick="add()" class="am-btn am-btn-default am-btn-secondary authBtn"><span class="am-icon-plus"></span> 添加管理员</button>
                                </div>
                            </div>
                        </div>
                       
                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-12">
                             <table class="am-table am-table-bordered am-table-radius am-table-striped datagrid"
                                    id="datagrid" 
				                    datasource="admin/list" 
				                    keyFeild="id"
				                    permissionIds='${AUTHSTR}'>
							    <thead>
							        <tr>
                                          <th style="width: 60px;" >序号</th>
                                          <th feild="loginid">账号</th>
                                          <th feild="truename">姓名</th>
                                          <th feild="nickname">昵称</th>
                                          <th feild="headUrl" 
                                           feildButton="{type:'img',url:'<%=basePath%>pa/detail/bankDuckRecords',feilds:['id'],width:'40px',height:'40px'}"
                                          >头像</th>
                                          <th feild="stateName">状态</th>
                                          <th feild="createtime">开通时间</th>
                                          <th align="center" class="oper" style="width: 220px;"
			                                  buttons="{authId:'p_11_1_2',title:'修改用户信息',type:'dialog',text:'修改',url:'<%=basePath%>admin/toUpdate',feilds:['id'],width:'300px',height:'350px',btnClass:'am-btn am-btn-primary am-btn-xs'}
			                                          ,{authId:'p_11_1_3',title:'审核用户信息',type:'dialog',text:'审核',url:'<%=basePath%>admin/toAudit',feilds:['id'],width:'350px',height:'550px',btnClass:'am-btn am-btn-danger am-btn-xs',enable:[['state'],['-1']]}
                                                      ,{authId:'p_11_1_3',type:'ajax',method:'common',text:'禁用',url:'<%=basePath%>admin/updateState',feilds:['id','state'],btnClass:'am-btn am-btn-danger am-btn-xs',enable:[['state'],['0']],otherParams:[['toState'],['1']]}
                                                      ,{authId:'p_11_1_3',type:'ajax',method:'common',text:'激活',url:'<%=basePath%>admin/updateState',feilds:['id','state'],btnClass:'am-btn am-btn-primary am-btn-xs',enable:[['state'],['1']],otherParams:[['toState'],['0']]}
                                                      ,{authId:'p_11_1_4',title:'修改用户密码',type:'dialog',text:'修改密码',url:'<%=basePath%>admin/toUpdateAdminPwd',feilds:['id'],width:'300px',height:'350px',btnClass:'am-btn am-btn-primary am-btn-xs'}"
                                          >操作</th>
				                     </tr>
							    </thead>
							    <tbody>
							    </tbody>
							</table>
							<div class="am-cf page" casedatagrid="datagrid">
                                    <div class="am-fr pageLeft" style="float: left;">
                                    </div>
                                    <div class="am-fr pageRight">
                                        <ul class="am-pagination tpl-pagination">
                                        </ul>
                                    </div>
                                </div>
                        </div>

                    </div>
                </div>
                <div class="tpl-alert"></div>
            </div>



    </div>


    <script src="js/jquery.min.js"></script>
    <script src="js/amazeui.min.js"></script>
    <script src="js/app.js"></script>
    <script src="js/layer${applicationScope.skin}/layer.js"></script>
    <script src="js/frame/datagrid.js"></script>
    <script>
    function add(){
       	dialog('添加管理员信息','admin/toAdd','400px','450px');
       }
    </script>


<jsp:include page="../footer.jsp"></jsp:include>
</body>

</html>